<!DOCTYPE HTML>
<html>
<head>
<title>Address</title>
<!--script src="lib/jquery/jquery-1.3.2.js"--><!--/script-->
<!--script src="http://code.google.com/apis/gears/gears_init.js"--><!--/script-->
<!--script src="js/mainPage.js"--> <!--/script-->

</head>
<!--------------------------------------------------------Design part of the code---------------------------------------------->
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginheight="0" marginwidth="0" bgcolor="#000066">

<table border="0" width="100%" cellspacing="0" cellpadding="0" bgcolor="#000066">
  <tr>
  <td><img src="../images/jsu_banner.jpg"></td>
  </tr>
</table>

<table border="0" width="100%" bgcolor="#000000" cellspacing="0" cellpadding="0">
  <tr>
  <center><td width="100%"><font color="#FFFFFF" face="Arial" size="2"><b>D.O.R.S. Jackson State University Edition</b></font></td></center>
   <?php
	session_start();
	$JNo = $_SESSION['JNo'];
	echo "<center><td width='100%'><font color='#FFFFFF' face='Arial' size='2'><b>JSU ID: $JNo</b></font></td></center>";
  ?>
  </tr>
</table>

<p align=right> 
 
  <?php
	echo "<a href = 'logout.php'><font face='Arial Black' size='5.3' color='#ffffff'><b>Logout</b></font></a>";
  ?> 
  </p>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="18%" bgcolor="#000066" valign="top">&nbsp;


<!------------------------------------------End of Design-------------------------------------------------------->
<center>
<img src="../images/logo.jpg">
</center>

<center>
<img src="../images/address_sign.jpg">
</center>

<center>
<!-- Permanent Address -->
<table border="3" width="25%" cellspacing="0" cellpadding="0" bgcolor="#F0F8FF">

<tr> 
<td><b>Permanent Address</b></td>
</tr>
	<?php
		$host="localhost"; // Host name
		$username="root"; // Mysql username
		$password=""; // Mysql password
		$db_name="JSU_Database"; // Database name

		// Connect to server and select database.
		mysql_connect($host, $username, $password)or die("cannot connect");
		mysql_select_db($db_name)or die("cannot select DB: ".mysql_error());

		$JNo = $_SESSION['JNo'];
		$result = mysql_query("SELECT * FROM address Where JNo = '$JNo'");
		$row = mysql_fetch_row($result);
		
		// 1st line
		echo "<tr><td>$row[1]</td></tr>";
		
		//City,State,Zip
		echo "<tr><td>$row[2]</td></tr>";
		
		//County
		echo "<tr><td>$row[3]</td></tr>";
		
		//Country
		echo "<tr><td>$row[4]</td></tr>";
		
	?>
</table>
</center>

<center>
<!--Mailing Address-->
<table border="3" width="25%" cellspacing="0" cellpadding="0" bgcolor="#F0F8FF">

<tr> 
<td> <b> Mailing Address </b> </td>
</tr>
	<?php
		$host="localhost"; // Host name
		$username="root"; // Mysql username
		$password=""; // Mysql password
		$db_name="JSU_Database"; // Database name

		// Connect to server and select database.
		mysql_connect($host, $username, $password)or die("cannot connect");
		mysql_select_db($db_name)or die("cannot select DB: ".mysql_error());

		$JNo = $_SESSION['JNo'];
		$result = mysql_query("SELECT * FROM address Where JNo = '$JNo'");
		$row = mysql_fetch_row($result);
		
		// 1st line
		echo "<tr><td>$row[5]</td></tr>";
		
		//City,State,Zip
		echo "<tr><td>$row[6]</td></tr>";
		
		//County
		echo "<tr><td>$row[7]</td></tr>";
		
		//Country
		echo "<tr><td>$row[8]</td></tr>";
	?>
</table>
</center>

<center>
<FORM action= "coursePage.php"> 
<INPUT type="button" value="Back" name="button1" onClick="history.go(-1); return true;"> 
<INPUT type="submit" value="Next" name="button2">
</FORM>
</center>

</body>
</html>